/* $Id: JPaintPaneUnitTest.java 63 2010-02-14 13:52:34Z aaron.day $ */
package org.crazydays.gameplan.view.paint;


import javax.swing.JPanel;

import org.junit.*;
import static org.junit.Assert.*;

import static org.easymock.EasyMock.*;
import static org.easymock.classextension.EasyMock.*;

/**
 * JPaintPaneUnitTest
 */
public class JPaintPaneUnitTest
{
    /**
     * Test initialize().
     */
    @Test
    public void testInitialize()
    {
        // mocks
        JControlsPanel controlsPanel = createMock(JControlsPanel.class);

        // setup
        JPaintPane component = new JPaintPane();
        component.setControlsPanel(controlsPanel);

        // replay
        replay(controlsPanel);

        // test
        component.initialize();

        // verify
        verify(controlsPanel);

        assertEquals("divider", 100, component.getDividerLocation());
        assertEquals("left", controlsPanel, component.getLeftComponent());
        assertTrue("right", component.getRightComponent() instanceof JPanel);
    }
}
